import request from '@/utils/request'

export default {
    //生成订单
    createOrder(courseId) {
        return request({
            url: `/eduorder/order/createOrder/${courseId}`,
            method: 'post'
        })
    },

    //根据订单id查询订单信息
    getOrderInfoById(orderNo) {
        return request({
            url: `/eduorder/order/getOrderById/${orderNo}`,
            method: 'get'
        })
    },

    //3、生成微信支付二维码
    createNative(orderNo) {
        return request({
            url: '/eduorder/pay/createNative/'+orderNo,
            method: 'get'
        })
    },
    //4、根据id获取订单支付状态
    queryPayStatus(orderNo) {
        return request({
            url: '/eduorder/pay/queryPayStatus/'+orderNo,
            method: 'get'
        })
    }
}